﻿using Bintje.bintje;
using System.Collections.Generic;

namespace Bintje
{
    public class WayPointWrapper
    {
        #region Fields

        private int m_orderNumber;
        private int m_score;
        private WayPoint m_wayPoint;
        private IList<ImageWrapper> m_images;

        #endregion
        
        #region Properties

        public int OrderNumber
        {
            get { return m_orderNumber; }
            set { m_orderNumber = value; }
        }

        public WayPoint WayPoint
        {
            get { return m_wayPoint; }
            set { m_wayPoint = value; }
        }

        public int Score
        {
            get { return m_score; }
            set { m_score = value; }
        }
        

        public IList<ImageWrapper> Images
        {
            get { return m_images; }
            set { m_images = value; }
        }

        #endregion

        #region ctor

        public WayPointWrapper(waypointWrapper waypointWrapper)
        {
            if (null != waypointWrapper.images && waypointWrapper.images.Length > 0)
            {
                IList<ImageWrapper> images = new List<ImageWrapper>();
                for (int i = 0; i < waypointWrapper.images.Length; i++)
                {
                    ImageWrapper image = new ImageWrapper(waypointWrapper.images[i]);
                    images.Add(image);
                }
                m_images = images;
            }
            m_orderNumber = waypointWrapper.orderNumber;
            m_score = waypointWrapper.score;
            m_wayPoint = new WayPoint(waypointWrapper.waypoint);
        } 

        #endregion
    }
}
